package net.stogi.unicore.beyond.ui.client.taskeditor.taskpreview;

import net.stogi.unicore.beyond.api.model.InputGroup;

import com.google.gwt.event.shared.GwtEvent;

public class InputGroupAddedEvent extends GwtEvent<InputGroupAddedHandler> {

	public static final GwtEvent.Type<InputGroupAddedHandler> TYPE = new GwtEvent.Type<InputGroupAddedHandler>();

	private InputGroup inputGroup;
	
	public InputGroupAddedEvent(InputGroup inputGroup) {
		this.inputGroup = inputGroup;
	}

	@SuppressWarnings("unused")
	private InputGroupAddedEvent() {}

	@Override
	public Type<InputGroupAddedHandler> getAssociatedType() {
		return TYPE;
	}

	public InputGroup getInputGroup() {
		return inputGroup;
	}

	public void setInputGroup(InputGroup inputGroup) {
		this.inputGroup = inputGroup;
	}

	@Override
	protected void dispatch(InputGroupAddedHandler handler) {
		handler.onInputGroupAdded(this);
	}
}
